﻿using System;

namespace cit.CopyDetection.DataObject
{
    public struct Term
    {
        public string WordString;
        public int ParagraphFrequency;
        public int GlobalFrequency;

        public Term(string wordString, int paragraphFrequency, int globalFrequency)
        {
            WordString = wordString;
            ParagraphFrequency = paragraphFrequency;
            GlobalFrequency = globalFrequency;
        }

        public bool Equals(Term term)
        {
            return string.Equals(this.WordString, term.WordString, StringComparison.InvariantCultureIgnoreCase);
        }

        public bool Equals(string word)
        {
            return string.Equals(this.WordString, word, StringComparison.InvariantCultureIgnoreCase);
        }
    }
}
